<template>
    <div class="search_part">
        <span>搜索: </span>
        <el-input :placeholder="plh_a"></el-input>
        <el-input :placeholder="plh_b"></el-input>
        <el-button type="primary" icon="el-icon-search" size="mini">搜索</el-button>
        <el-button type="primary" icon="el-icon-plus" size="mini" @click="addData">添加</el-button>

        <!-- 弹框组件 -->
         <DialogAdd  :url="url" :name="name" hd="添加"></DialogAdd>
    </div>
    
</template>

<style lang="scss" scoped>
    .search_part {
        display: flex;
        align-items: center;
        margin-bottom: 20px;
        span {
            font-size: 15px;
            margin-right: 20px;
        }
        .el-input  {
            width: 180px;
            margin-right: 20px;
            .el-input__inner {
                height: 33px;
               line-height: 30px;
            }
        }
        .el-button .el-button--primary .el-button--mini {
            padding: 10px 0px;
            i {
                margin-left: 7px;
            }
        }
    }    
</style>

<script>
import DialogAdd from "@c/Dialog-add";
export default {
    data() {
        return {
            // user页面相关
            dialogadd: false,
            name: ['用户名:', '权限:', '密码:', '手机号:', '邮件:', '性别:'],
            url: '/system/user/adddata',
          
        }
    },
    components: { DialogAdd },
    props: ['plh_a', 'plh_b'],
    created () {
        this.$store.commit('dialogadd', this.dialogadd)
    },
    methods: {
        addData () {
            this.$store.state.dialogadd = true;
        }
    }
}
</script>